package global

import "time"

// 核心配置
const (
	SaveDir       = "./complete/mnt/src/" // 本地文件保存目录（改为相对路径，避免权限问题）
	StaticPath    = "/file/src/"          // HTTP静态文件访问路径（映射到saveDir）
	ChunkSize     = 10 << 20              // 大文件分块阈值（10MB，超过自动分块）
	MaxUploadSize = 5 << 30               // 最大支持5GB文件
	ProgressTTL   = 24 * time.Hour        // 断点续传进度有效期
)

const (
	BossUrl   = "https://www.zhipin.com/"
	NotifyUrl = "http://xxx.xx.xx.x:9091/notify/task/api"
	AppTitle  = "CityBoss"
	ExeName   = "gui.exe"
	UserIP    = "userIp"

	CookieKey  = "guicookie"
	TokenKey   = "_userToken"
	UserDtaKey = "_userdata"

	PwdKeyOld = "k7XWkCNolhKI8CzV" //暂时先这样写
	PwdCount  = "pwd_count"

	My_zset = "my_zset"

	DefaultLogPath = "log/"
	//MaxFileSize    = 2 * 1024 * 1024 // 2MB
	MB           = 1 << 20 // 1MB = 2^20 Bytes
	MaxFileSize  = 2 * MB
	ExpiresIn    = 86400
	DefaultScore = 1.0 // 默认优先级

	// 邮件服务器配置
	SmtpServer   = "smtp.163.com"     // 邮件服务器地址
	SmtpPort     = 587                // SMTP 端口（465 用于 SSL）
	SmtpPassword = "WOIGZZHLZLLBAYWH" // SMTP 密码
	// 发件人和收件人
	From = "wm224119@163.com"

	//文件路径
	DefaultAvatar = "/static/img/defAvatar/default.jpg"

	UploadImgSrc   = "/mnt/src/img/"
	UploadPDFSrc   = "/mnt/src/pdf/"
	UploadXlsxSrc  = "/mnt/src/xlsx/"
	UploadOtherSrc = "/mnt/src/other/"
)

var (
	PwdKeyNew = []byte("gba-pwd-666-asdfqwer-pwd") //暂时先这样写
)

type CacheKey string

const (
	CountKey   CacheKey = "sms:count_"
	TimeoutKey CacheKey = "sms:timeout_"
)

type Email string

const (
	AuthorEmail   Email = "2474925081@qq.com"
	SmtpUserEmail Email = "wm224119@163.com" // SMTP 用户名
)
